import { createApp } from 'vue'
import App from '@/App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
// svg插件需要的配置代码
import 'virtual:svg-icons-register'
// import SvgIcon from '@/components/SvgIcon/index.vue'
//引入自定义插件对象：注册整个项目的全局组件
import allGlobalComponent from '@/components/index.ts'

//引入路由
import router from './router'

//引入仓库
import pinia from '@/store'

const app = createApp(App)

app.use(router)
app.use(allGlobalComponent)
//安装仓库Pinia
app.use(pinia)
// app.use(ElementPlus)

app.use(ElementPlus, {
  locale: zhCn,
})

import axios from 'axios'
axios({
  url:'api/user/login',
  method:"post",
  data:{
    username:'admin',
    password:'111111'
  }
})

app.mount('#app')
//注册模板路由


// app.component('SvgIcon', SvgIcon)

//安装自定义插件

//   app.use(setupGlobal)


// console.log(import.meta.env)

//引入模板的全局样式
// import '@/styles/index.scss'
//测试
